package com.muyu.marketing.bargain.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.muyu.common.core.annotation.Excel;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 砍价商品实体类
 * 
 * @author muyu
 * @date 2025-01-27
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("bargain_product")
public class BargainProduct extends BaseEntity {
    
    private static final long serialVersionUID = 1L;

    /** 砍价商品ID */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /** 商品ID */
    @Excel(name = "商品ID")
    private Long productId;

    /** 商品名称 */
    @Excel(name = "商品名称")
    private String productName;

    /** 商品图片 */
    @Excel(name = "商品图片")
    private String productImage;

    /** 商品描述 */
    @Excel(name = "商品描述")
    private String productDescription;

    /** 原价 */
    @Excel(name = "原价")
    private BigDecimal originalPrice;

    /** 砍价价格 */
    @Excel(name = "砍价价格")
    private BigDecimal bargainPrice;

    /** 最低砍价价格 */
    @Excel(name = "最低砍价价格")
    private BigDecimal minBargainPrice;

    /** 砍价人数 */
    @Excel(name = "砍价人数")
    private Integer bargainers;

    /** 库存数量 */
    @Excel(name = "库存数量")
    private Integer stock;

    /** 销量 */
    @Excel(name = "销量")
    private Integer sales;

    /*** 剩余数量*/
    @Excel(name = "剩余数量")
    private Integer remainingQuantity;

    /** 成功砍价数 */
    @Excel(name = "成功砍价数")
    private Integer successfulBargains;

    /** 状态：0-未开始，1-进行中，2-已结束 */
    @Excel(name = "状态", readConverterExp = "0=未开始,1=进行中,2=已结束")
    private Integer bargainStatus;

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    /** 砍价次数限制 */
    @Excel(name = "砍价次数限制")
    private Integer bargainLimit;


    /** 排序 */
    @Excel(name = "排序")
    private Integer sort;
    /**
     * 上架状态
     */
    @Excel(name = "上架状态")
    private Integer putawayStatus;

    /** 是否删除：0-未删除，1-已删除 */
    private Integer deleted;
    /**
     * 1快递/2到店*/
    @Excel(name = "发送类型")
    private Integer logistics;

    /** 创建人 */
    @Excel(name = "创建人")
    private String createBy;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** 更新人 */
    @Excel(name = "更新人")
    private String updateBy;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

}